<template>
  <Content :style="{ padding: '0 16px 16px' }">
    <div class="header">
      <div class="title-box">
        <div class="line"></div>
        <div class="title">{{ title }}</div>
      </div>
      <div class="btn-box">
        <slot name="btn"></slot>
      </div>
    </div>
    <slot name="content"></slot>
  </Content>
</template> 

<script setup>
const props = defineProps({
  title: {
    type: String,
    default: '',
  },
})

// 明确声明组件接受的 emits
const emit = defineEmits(['pageChange','pageSizeChange'])
</script>

<style scoped>
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.title-box {
  display: flex;
  align-items: center;
  margin: 15px 0;
  .line {
    width: 16px;
    height: 5px;
    background: #409eff;
    margin-right: 10px;
    border-radius: 3px;
  }
  .title {
    font-size: 20px;
    font-weight: bold;
  }
}
</style>
 